/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chatsystem.observable;

/**
 *
 * @author morrison
 */
public class FileTransfertSignal {

    private String username;
    private String filename;
    
    public final static int SENDING = 1;
    public final static int RECEIVING = 2;
    private int type;
    
    public final static int ADDED = 1;
    public final static int STARTED = 2;
    public final static int REMOVED = 3;
    private int state;
    
    private int progress;

    public FileTransfertSignal(String username, String filename, int type, int state) {
        this.username = username;
        this.filename = filename;
        this.type = type;
        this.state = FileTransfertSignal.ADDED;
        this.progress = -1;
    }

    public int getProgress() {
        return progress;
    }

    public FileTransfertSignal setProgress(int progress) {
        this.progress = progress;
        return this;
    }

    public String getFilename() {
        return filename;
    }

    public int getState() {
        return state;
    }
    
    public FileTransfertSignal setStarted() {
        this.state=FileTransfertSignal.STARTED;
        return this;
    }
    
    public FileTransfertSignal setRemoved() {
        this.state=FileTransfertSignal.REMOVED;
        return this;
    }

    public int getType() {
        return type;
    }

    public String getUsername() {
        return username;
    }
}
